import dataclasses


@dataclasses.dataclass
class ResultCont:
    Code: int
    Msg: str


class SysCont:
    Success = ResultCont(200, "请求成功")
    Forbidden = ResultCont(300, "认证失败")
    ParameterAuthErr = ResultCont(401, "参数校验失败")
    NotUser = ResultCont(402, "未找到用户")
    UserBlack = ResultCont(403, "操作禁止")
    Failed = ResultCont(405, "操作失败")


class BllCont:
    class Order:
        NotOrder = ResultCont(600010, "为找到订单信息")


class MysqlCont:
    ConnectionErr = ResultCont(8001, "数据库链接异常")
    CreateErr = ResultCont(8002, "数据库插入异常")
    SelectErr = ResultCont(8003, "数据库查询异常")
    UpdateErr = ResultCont(8004, "数据库更新异常")
    DeleteErr = ResultCont(8005, "数据库删除异常")


class RedisCont:
    ConnectionErr = ResultCont(7001, "Redis链接异常")
